<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
	<head>
		<%@ include file="/WEB-INF/jsp/inc/taglibs.jsp"%>
		<%@ include file="/WEB-INF/jsp/inc/meta.jsp"%>
	</head>
	<script>
		function selected(){
			
			var a = new Array() ;
			
			var tasks = document.getElementsByName("task") ;
			
			for(var i = 0 ; i < tasks.length ; i++){
				if(tasks[i].checked){
					a.push(tasks[i].value);
				}
			}
			
			window.opener.selected(a);
			window.close();		
		}
	</script>
	<body style="background: #E8F5FE; padding: 15px 18px;" class="scroll_r">
				
				<table border="0" cellpadding="" cellspacing="1" align="center"
					width="92%" id="web_tab">
					<tr>
						<th>
							选择
						</th>
						<th>
							用户类型
						</th>
						<th>
							申请人
						</th>
						<th>
							地址
						</th>
						<th>
							身份证号
						</th>
						<th>
							联系电话
						</th>
						<th>
							申请户数
						</th>
						<th>
							付款方式
						</th>
						<th>
							申请时间
						</th>
					</tr>
				<c:forEach var="apply" items="${page.items}">
					<tr>
						<td><input name="task" type="checkbox" value="${apply.applyId},${apply.customTypeView},${apply.customName},${apply.address}${apply.addressExtend},${apply.telNo},${apply.shenqingDate}"></td>
						<td>${apply.customTypeView}</td>
						<td>${apply.customName}</td>
						<td>${apply.address}${apply.addressExtend}</td>
						<td>${apply.cardId}</td>
						<td>${apply.telNo}</td>
						<td>${apply.amount}</td>
						<td>${apply.payTypeView}</td>
						<td>${apply.shenqingDate}</td>
					</tr>
				</c:forEach>
				</table>
				<table border="0" cellpadding="0" cellspacing="1" width="92%"
					align="center">
					<tr>
						<td align="left">
							共有
							<font color='red'>${page.totalCount}</font> 条记录，当前第
							<font color='red'>${page.currentPage}</font>页，共
							<font color='red'>${page.pageCount}</font>页
						</td>
						<td align="right">
							转到
							<select name="topage" id="topage" onchange="window.location.href='${approot}/admin/apply/applyForSelect/' + this.value">
								<c:forEach var="ind" items="${page.pages}">
									<option value="${(ind-1)*page.pageSize}"
										<c:if test="${ind==page.currentPage}">selected="selected"</c:if>>
										${ind}
									</option>
								</c:forEach>
							</select>
							<button class="but"
								onclick="window.location.href='${approot}/admin/apply/applyForSelect/${page.firstIndex}'">
								首页
							</button>
							<button class="but"
								onclick="window.location.href='${approot}/admin/apply/applyForSelect/${page.previousIndex}'">
								上一页
							</button>
							<c:forEach items="${page.showpages}" var="ind">
								<c:if test="${ind!=0}">
									<a
										href="${approot}/admin/apply/applyForSelect/${(ind-1)*page.pageSize}">${ind}</a>
								</c:if>
							</c:forEach>
							<button class="but"
								onclick="window.location.href='${approot}/admin/apply/applyForSelect/${page.nextIndex}'">
								下一页
							</button>
							<button class="but"
								onclick="window.location.href='${approot}/admin/apply/applyForSelect/${page.lastIndex}'">
								末页
							</button>

						</td>
					</tr>
				</table>
				
			<p id="tab_but">
				<input type="button" value="确 定" onclick="selected()">
			</p>
	</body>
</html>
